package sj.sj6.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sj.sj6.dao.UserDao;
import sj.sj6.pojo.User;
import sj.sj6.service.UserService;

@Service("userService")
/**
 * 用户业务类，实现对User功能的业务管理
 */
public class UserServiceImpl implements UserService {

    /**
     * 声明接口类型的引用，和具体实现类解耦合
     */
    @Autowired
    private UserDao dao;

    /**
     * 保存用户信息
     * @param user
     */
    @Override
    public void save(User user) {
        //保存信息
        dao.save(user);
    }

}
